Generating bracelets with fixed content
نویسندگان
چکیده
We present an algorithm to generate bracelets with fixed content. An analysis shows that the algorithm runs in constant amortized time. The algorithm can be applied to efficiently list all non-isomorphic unicyclic graphs with n vertices.
منابع مشابه
Generating Bracelets in Constant Amortized Time
A bracelet is the lexicographically smallest element in an equivalence class of strings under string rotation and reversal. We present a fast, simple, recursive algorithm for generating (i.e., listing) k-ary bracelets. Using simple bounding techniques, we prove that the algorithm is optimal in the sense that the running time is proportional to the number of bracelets produced. This is an improv...
متن کاملCombinatorial Proofs of Fermat's, Lucas's, and Wilson's Theorems
The Lucas numbers, 2, 1, 3, 4, 7, 11, 18, 29, 47, . . . , named in honor of Edouard Lucas (1842-1891), are defined by L0 = 2, L1 = 1, and Ln = Ln−1 + Ln−2 for n ≥ 2. It is easy to show that, for n ≥ 1, Ln counts the ways to create a bracelet of length n using beads of length one or two, where bracelets that differ by a rotation or a reflection are still considered distinct. For example, there a...
متن کاملFast Algorithms to Generate Necklaces, Unlabeled Necklaces, and Irreducible Polynomials over GF(2)
Many applications call for exhaustive lists of strings subject to various constraints, such as inequivalence under group actions. A k-ary necklace is an Ž . equivalence class of k-ary strings under rotation the cyclic group . A k-ary unlabeled necklace is an equivalence class of k-ary strings under rotation and permutation of alphabet symbols. We present new, fast, simple, recursive algoŽ . rit...
متن کاملPatients who wore standard magnetic bracelets reported reduced pain from osteoarthritis of the hip or knee compared with patients wearing placebo bracelets.
Harlow T, Greaves C, White A, et al. Randomised controlled trial of magnetic bracelets for relieving pain in osteoarthritis of the hip and knee. BMJ 2004;329:1450–4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ....
متن کاملConstructal design of tree-shaped conductive pathways for cooling a heat generating volume
Constructal design is used to study heat removal from a square heated body with a tree shaped high thermal conductivity pathways embedded in the body. The objective is to minimize the defined maximum dimensionless temperature difference for the body. The thermal conductivity of the body is low, and there is a uniform heat generation on it. The volume of the body is fixed. The amount of high con...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
- Theor. Comput. Sci.
دوره 475 شماره
صفحات -
تاریخ انتشار 2013